package tmp;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.ListIterator;

import javax.jnlp.ServiceManager;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		jnlp();
	}

	static void listIterator(){
		List<Integer> list = new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5, 6));
		System.out.println(list);
		for (ListIterator<Integer> iter = list.listIterator(list.size()); iter.hasPrevious();) {
			int i = iter.previous();
			iter.remove();
			System.out.println("remove: " + i);
			if (4 == i) {
				break;
			}
		}
		System.out.println(list);
	}
	
	static void jnlp(){
		String[] serviceNames = ServiceManager.getServiceNames();
		p(Arrays.toString(serviceNames));
		
	}
	
	static void p(Object msg){
		System.out.println(msg);
	}
}
